package com.java_senior_3;

import java.util.LinkedList;

public class MyStack {

    private LinkedList linkedlist;
    public void push(Object obj){
        linkedlist.addFirst(obj);
    }
    public Object pop(){
        return linkedlist.removeFirst();

    }
    public Object peek(){

        return linkedlist.get(0);
    }
    public boolean isEmpty(){
       return linkedlist.isEmpty();
    }
    public int size(){
       return linkedlist.size();
    }

}
